<template>
  <div class="mianbao">
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <template v-if="route.path !== '/index'">
        <el-breadcrumb-item
          :to="{ path: item.path }"
          v-for="item in route.matched"
          :key="item.name"
          >{{ item.meta.title }}</el-breadcrumb-item
        ></template
      >
    </el-breadcrumb>
  </div>
</template>

<script setup lang="ts">
import { useRoute } from "vue-router";
const route = useRoute();
</script>

<style scoped>
.mianbao {
  margin-bottom: 10px;
}
</style>
